package Day01;

/**
 * @author feng
 * @Date 2021/9/24 9:59
 */
public class StringBuilderDemo {
    public static void main(String[] args) {
        StringBuilder ss = new StringBuilder("Hello");
        System.out.println(ss.length());
        System.out.println(ss.capacity());
        ss.append("java");
        System.out.println(ss);
        System.out.println(ss.insert(5,","));
        System.out.println(ss.replace(6,10,"World!"));
        //字符串反转
        System.out.println(ss.reverse());
    }
}
